<template>
	<view class="main">
		<u-navbar title='装修详情' :autoBack="true" bgColor="transparent"></u-navbar>
		<image @click="mobileShow = true"
			style="width: 120rpx;height:120rpx;position:fixed;bottom:150rpx;right: 50rpx;z-index:100"
			src="https://renovationcdn.jiachuangnet.com/serverMan.png">
		</image>
		<view class="bg"></view>
		<view class="container">
			<view class="storeInfo flex bewteen alignItem" style="position: relative;">
				<view style="width: calc(100% - 200rpx);">
					<view class="flex alignItem" style="width: 100%;">
						<image style="width: 30rpx;height: 30rpx"
							src="https://renovationcdn.jiachuangnet.com/index/homeIcon.png" />
						<view style="font-size: 38rpx;font-weight:700;margin:0 10rpx">{{info.assignName}}</view>
						<image @click='setClip' style="width: 30rpx;height:30rpx"
							src="https://renovationcdn.jiachuangnet.com/details/copy.png">
						</image>
						<!-- <u-icon name="share-square" size="20" :color='color'></u-icon> -->
					</view>
					<view style="width:100%;margin-top:30rpx;font-size: 28rpx;color:#1E272E" class="flex">
						<view style="width: 100rpx;">地址：</view>
						<view style='width: calc(100% - 150rpx);'>{{info.address}}</view>
						<image @click="open" src="https://qiniushelves.jiachuangnet.com/shelf/img/V936345navi.png"
							style="width: 50rpx;height:50rpx"></image>
					</view>
					<view style="width:100%;margin-top:30rpx;font-size: 28rpx;color:#1E272E;justify-content: space-between;" class="flex">
						<view class="flex">
							<view>类型：</view>
							<view>{{info.storeType==1?'普通店':'旗舰店'}}</view>
						</view>
					</view>
				</view>
				<!-- 未开始 -->
				<image v-if="!info.status||info.status == 0"
					src="https://renovationcdn.jiachuangnet.com/index/weikaishi.png"
					style="width: 178rpx;height:154rpx;position: absolute;top:-10rpx;right:0rpx">
				</image>
				<view v-if="info.status==1">
					<!-- 进行中 -->
					<image
						src="https://renovationcdn.jiachuangnet.com/day.png"
						style="width: 178rpx;height:154rpx;position: absolute;top:-10rpx;right:0rpx">
					</image>
					<view class="day" style="width: 178rpx;line-height:124rpx;position: absolute;top: 10rpx; vertical-align: middle;right: 0rpx;">
						第{{info.day|numberToChanieFilter}}天
					</view>
				</view>
				<!-- 已逾期 -->
				<image v-if="info.status == 2"
					src="https://renovationcdn.jiachuangnet.com/index/yiyuqi.png"
					style="width: 178rpx;height:154rpx;position: absolute;top:-10rpx;right:0rpx">
				</image>
				<!-- 已完成 -->
				<image v-if="info.status == 3"
					src="https://renovationcdn.jiachuangnet.com/index/yiwancheng.png"
					style="width: 178rpx;height:154rpx;position: absolute;top:-10rpx;right:0rpx">
				</image>
				<text v-if="loginType===3||loginType===6" @click="toPath('clockIn')"  style="position: absolute;bottom:0rpx;right:0rpx;font-size: 26rpx;color: #32b4c3;text-decoration: underline;">去打卡</text>
			</view>
			<view class="top20 infoContent">
				<view>
					<view class="label">姓名</view>
					<view class="val">{{info.projectUserName}}</view>
				</view>
				<view>
					<view class="label">指派人</view>
					<view class="val">{{info.userName}}</view>
				</view>
				<view @click="call">
					<view class="label">电话</view>
					<view class="val flex alignItem" style="display: flex !important">
						<text style="margin-right: 10rpx;font-size: 26rpx;">{{info.projectPhone}}</text>
						<image style="width: 24rpx;height: 24rpx;"
							src="https://renovationcdn.jiachuangnet.com/details/mobile.png">
						</image>		
					</view>
				</view>
				<view v-if="!info.customerName&&(loginType===0||loginType===3||loginType===1)" @click="toPath('invite')">
					<view class="label">客户</view>
					<view class="val flex alignItem" style="display: flex !important">
						<text style="height: 100%; margin-right: 10rpx;font-size: 26rpx;color: #32b4c3;text-decoration: underline;">去邀请</text>
					</view>
				</view>
				<view v-else>
					<view class="label">客户</view>
					<view class="val flex alignItem" style="display: flex !important">
						<text style="margin-right: 10rpx;font-size: 26rpx;">{{info.customerName||''}}</text>
					</view>
				</view>
				<view>
					<view class="label">售后</view>
					<view class="val flex alignItem" style="display: flex !important">
						<text style="margin-right: 10rpx;font-size: 26rpx;">{{info.afterName}}</text>
					</view>
				</view>
				<view>
					<view class="label">时间</view>
					<view class="val">{{info.createTime}}</view>
				</view>
			</view>
			<view style="width: 100%;height: 600rpx;margin-top: 20rpx;position:relative" v-if="loginType!=4&&loginType!=6">
				<view style="position: absolute;left:20rpx;top:40rpx;display: flex;justify-content: space-between;z-index:100;color:white;width: 100%;"
					class="alignItem">
					<view class="alignItem" style="display: flex;">
						<view class="line" style="background-color: white;"></view>
						<view :style="{'fontWeight':'700'}">施工实况</view>
						<text v-if="loginType===0||loginType===3||loginType===1" @click="videoSrcBind=true" style="height: 100%; margin-left: 10rpx;font-size: 26rpx;color: #fff;text-decoration: underline;">{{info.serialNumber.length?'修改':'添加'}}</text>
						<view style="width: 170rpx;margin-left: -5rpx;" v-if="currentSerialNumberMsg">
							<uni-data-select   style="width: 170rpx;"  v-model="currentSerialNumber" :localdata="currentSerialNumberMsg" @change="changeSerialNumberMsg"></uni-data-select>
						</view>
					</view>
					<text v-if="info.serialNumber.length&&(loginType===0||loginType===3||loginType===1)" @click="aiMessageShow=true" style="height: 100%; margin-right: 25rpx;font-size: 26rpx;color: #2679a2;text-decoration: underline;">抓拍信息</text>
				</view>
				<view
					style="width: calc(100% - 40rpx);height: 480rpx;position: absolute;top:130rpx;left: 20rpx;z-index:20;">
					<view  style="width: 100%;height: 100%;" v-if="!videoSrc||videoStatus==-1">
						<u-empty
						        icon="https://renovationcdn.jiachuangnet.com/shipin.png"
								style="width: 100%;height: 100%;"
								:text="textVideo"
						>
						</u-empty>
					</view>
					<!-- #ifdef MP-WEIXIN -->
					<video v-if="videoSrc&&videoStatus==1" style="width: 100%;height: 450rpx;border-radius:20rpx;" object-fit='cover'
						:src='videoSrc' :autoplay='true'
						loop="true" poster></video>
					<!-- #endif -->
					<!-- #ifdef APP -->
					<!-- src='https://assets.mixkit.co/video-templates/41/mixkit-41-360.mp4' -->
					<rayVideo v-if="videoSrc&&videoStatus==1" style="width: 100%;height: 450rpx"
					:src='videoSrc'
					
					></rayVideo>
					<!-- <view style="height: 450rpx;width: 100%;" v-html="video"></view>
					-->
					<!-- #endif -->
				</view>
				<image style='width: 100%;height: 600rpx;'
					src="https://renovationcdn.jiachuangnet.com/details/videoBg.png">
				</image>
			</view>
			<view class="CADImage" v-if="loginType!=4&&loginType!=6">
				<view style="position: absolute;left:20rpx;top:20rpx;display: flex;z-index:100" class="alignItem">
					<view class="line"></view>
					<view :style="{'color':color,'fontWeight':'700'}">CAD材料图</view>
					<text v-if="loginType===0||loginType===3||loginType===1" @click="upload=true" style="height: 100%; margin-left: 10rpx;font-size: 26rpx;color: #32b4c3;text-decoration: underline;">{{info.cadUrl?'重传':'上传'}}</text>
				</view>
				<view style="position: absolute;z-index: 20;width:calc(100% - 40rpx);left:20rpx;height: 390rpx;top:75rpx" >
					<image v-if="info.cadUrl" :src="info.cadUrl" style="width: 100%;height: 100%;" @click="CADClick"></image>
				</view>
				<image
					src="https://renovationcdn.jiachuangnet.com/details/CADBg.png"
					style="width: 100%;height: 520rpx;position: absolute;z-index: 1;"></image>
			</view>
			<view class="swiperImage" v-if="loginType!=4&&loginType!=6">
				<view style="position: absolute;left:20rpx;top:20rpx;display: flex;z-index:100" class="alignItem">
					<view class="line"></view>
					<view :style="{'color':color,'fontWeight':'700'}">立面图</view>
					<text v-if="loginType===0||loginType===3||loginType===1" @click="upload1=true" style="height: 100%; margin-left: 10rpx;font-size: 26rpx;color: #32b4c3;text-decoration: underline;">{{info.elevations.length?'继续添加':'上传'}}</text>
				</view>
				<view
					v-if="info.elevations.length!=0"
					style="position: absolute;z-index: 20;width:calc(100% - 40rpx);left:20rpx;height: 390rpx;top:75rpx">
					<u-swiper @click='swiperClick(i)' :indicatorActiveColor='color' indicatorInactiveColor='#c3c3c3'
						indicator indicatorMode="dot" circular height="370rpx" :list="info.elevations"></u-swiper>
				</view>
				<image
					src="https://renovationcdn.jiachuangnet.com/details/CADBg.png"
					style="width: 100%;height: 520rpx;position: absolute;z-index: 1;"></image>
			</view>
			<view style="margin:0 auto;margin-top: 40rpx;margin-bottom: 30rpx;" class="alignItem flex bewteen" v-if="loginType!=4&&loginType!=6">
				<view class="flex alignItem">
					<view class="line" :style="{'background':color}"></view>
					<view :style="{'color':color,'fontWeight':'700'}">材料明细</view>
				</view>
				<text v-if="loginType===1||loginType===3||loginType===0" @click='toPath("replenishmentRecord")' style="font-size: 24rpx;margin-right:10rpx;text-decoration: underline;"
					:style="{'color':color}">材料详情</text>
			</view>
			<view class="materialBox" v-if="loginType!=4&&loginType!=6">
				<view class="materialInner">
					<view class="materialTitle flex alignItem" style="text-align: center;">
						<view style="width: 50%;">材料</view>
						<view style="width: 50%;">数量</view>
					</view>
					<scroll-view @scroll="scroll" :scroll-y="true" style="height: 370rpx;width:100%;background:#DEF4F4">
						<view v-for="(v,i) in info.materialList" :key="i" class="materialItem  flex alignItem"
							style="text-align: center;font-size: 26rpx;">
							<view style="width: 50%;">{{v.name}}</view>
							<view style="width: 50%;">{{v.buyCount}}</view>
						</view>
					</scroll-view>
				</view>
			</view>
			<view style="margin-top: 40rpx;margin-bottom: 30rpx;" class="flex bewteen alignItem">
				<view class="flex alignItem">
					<view class="line" :style="{'background':color}"></view>
					<view :style="{'color':color,'fontWeight':'700'}">装修进度</view>
					<text v-if="loginType===3" @click='toPathB("grade")' style="font-size: 24rpx;margin-left:10rpx;text-decoration: underline;"
						:style="{'color':color}">去打分</text>
				</view>
				<!-- 管理员\监理\经理\超级管理员 -->
				<text v-if="loginType===1||loginType===2||loginType===3||loginType===0" @click='toPath("checkAccept")' style="font-size: 24rpx;margin-right:10rpx;text-decoration: underline;"
					:style="{'color':color}">验收记录</text>
			</view>
			<scroll-view class="scroll-view_H" scroll-x="true">
				<view class="scroll-view-item_H" v-for="(v,i) in taskList" @click="active = i" :key="i"
					:class='active == i ?"active":""'>
					第{{v.today}}天
				</view>
			</scroll-view>
			<view class="taskInner" >
				<scroll-view style="height: 330rpx;width:100%;" scroll-y="true" v-if="loginType==3">
					<view v-for="(v,i) in taskList" :key="i"  >
						<view v-if="active == i">
							<u-checkbox-group placement="column" iconPlacement="right" :disabled="info.status==3&&loginType!=3" v-model="checkboxValueList[i]" >
								<u-checkbox 
									:customStyle="{padding: '20px',borderBottom:'1rpx solid #eee'}"
									v-for="(item, index) in v.list" :key="index" :label="item.name" :name="item.name"
									activeColor='#13989a'
									:disabled="item.disabled">
								</u-checkbox>
							</u-checkbox-group>
						</view>
						
					</view>
				</scroll-view>
				<view v-if="loginType!=3&&taskList.length">					<view style="height: 330rpx;overflow-y: auto;">
						<view v-for="(v,ii) in taskList[active].list" :key="ii" >
							<view style="padding: 20rpx 10rpx;border-bottom: 1px solid #cde5e5;">
								<view style="display: flex;justify-content: space-between;">
									<text>{{v.name}}</text>
									<view v-show="!v.disabled&&loginType==6"  @click="taskChange(v.name)" style="color: #ff743f;font-size: 24rpx;margin-right:10rpx;text-decoration: underline;">
										上传
									</view>
									<view v-if="v.disabled" :style="{'color':color}"  style="font-size: 24rpx;margin-right:10rpx;">
										已完成
									</view>
									<view v-if="!v.disabled&&loginType!=6"   style="color: #ff743f;font-size: 24rpx;margin-right:10rpx;">
										未完成
									</view>
								</view>
							</view>
						</view>
											</view>				</view>
			</view>
			<view class="swiperImage" style="margin-bottom: 40rpx;"  v-if="overImgList.length!=0">
				<view style="position: absolute;left:20rpx;top:20rpx;display: flex;z-index:100" class="alignItem">
					<view class="line"></view>
					<view :style="{'color':color,'fontWeight':'700'}">任务验收图</view>
				</view>
				<view
					v-if="overImgList.length!=0"
					style="position: absolute;z-index: 20;width:calc(100% - 40rpx);left:20rpx;height: 390rpx;top:75rpx">
					<u-swiper @click='swiperClick2(i)'  keyName="image"  :showTitle="true" :indicatorActiveColor='color' indicatorInactiveColor='#c3c3c3'
						indicator indicatorMode="dot" circular height="370rpx" :list="overImgList"></u-swiper>
				</view>
				<image
					src="https://renovationcdn.jiachuangnet.com/details/CADBg.png"
					style="width: 100%;height: 520rpx;position: absolute;z-index: 1;"></image>
			</view>
			<view style="width:415rpx;margin:0 auto;margin-top: 25rpx;padding-bottom:25rpx" >
				<u-button shape="circle" color='linear-gradient(132deg, #02ABC7, #01C9A3)' @click="submit" v-if="loginType===3"> 保存</u-button>
			</view>
			<view style="width:415rpx;margin:0 auto;margin-top: 25rpx;padding-bottom:25rpx" >
				<u-button shape="circle" color='linear-gradient(132deg, #02ABC7, #01C9A3)' @click="afterSaleShow=true" v-if="loginType==4&&info.isAfter"> 申请售后</u-button>
			</view>
		</view>
		<u-popup :show="userEvaluateFormShow " mode="bottom" round="10" @close='close' closeable closeOnClickOverlay>
			<view style='padding:50rpx 30rpx'>
				<view>请您对 <text style="margin:0 20rpx;" :style="{'color':color}">{{info.assignName}}</text>装修工程进行评分</view>
				<view style="margin: 20rpx auto;color:#c9c9c9;font-size: 24rpx;" class="flex bewteen alignItem">
					<view>非常不满意</view>
					<view>非常满意</view>
				</view>
				<view class="flex alignItem bewteen">
					<view @click="userClick(i)" v-for="(v,i) in 10"  :key="i" :class="userActive == i ? 'userActive':''" style="border:1rpx solid #c3c3c3;border-radius: 4rpx;padding:10rpx 16rpx">
						{{i+1}}
					</view>
				</view>
				<view style="border:1rpx solid #eee;box-sizing: border-box;margin:30rpx 0;">
				<u-textarea v-model='userFeedbackRemark' placeholder="如有需要,请将您的问题填写在此 谢谢!"></u-textarea>
				</view>
				<u-button shape="circle" :color='color' @click="addAppraise">提交</u-button>
			</view>
		</u-popup>
		<u-popup :show="upload" @close="close" round="10" mode="bottom">
			<view class="uploadForm">
				<view class="upload_title">
					<text>上传CAD图</text>
				</view>
				<view class="flex alignItem bewteen" style="margin: 50rpx 0;">
					<view class="label">CAD图</view>
					<view class="val flex" style="justify-content: flex-end;">
						<!-- <u-upload :fileList="fileList3" @afterRead="afterRead" @delete="deletePic" name="3" multiple
							:maxCount="2" :previewFullImage="true"></u-upload> -->
							<upload name='4' :maxCount="1" @uploadFile="uploadCADFile"></upload>
					</view>
				</view>
				<u-button type="primary"  text="上传" @click="onSubmit" ></u-button>
			</view>
		</u-popup>
		<u-popup :show="upload1" @close="close" round="10" mode="bottom">
			<view class="uploadForm">
				<view class="upload_title">
					<text>上传立面图</text>
				</view>
				<view class="flex alignItem bewteen" style="margin: 50rpx 0;">
					<view class="label">立面图</view>
					<view class="val flex" style="justify-content: flex-end;">
						<!-- <u-upload :fileList="fileList3" @afterRead="afterRead" @delete="deletePic" name="3" multiple
							:maxCount="2" :previewFullImage="true"></u-upload> -->
							<upload name='5'  @uploadFile="uploadFile" :fileListInit="initElevations"></upload>
					</view>
				</view>
				<u-button type="primary"  text="上传" @click="onSubmit1" ></u-button>
			</view>
		</u-popup>
		<u-popup :show="videoSrcBind" @close="close" round="10" mode="bottom">
			<view class="uploadForm">
				<view class="upload_title">
					<text>绑定监控</text>
				</view>
				<view class="flex alignItem bewteen" style="margin: 50rpx 0;" v-for="(item,index) in serialNumber" :key="index">
					<view class="label" style="width: 200rpx;">{{index+1}}. 监控序列号: </view>
					<view class="val" style="display: flex;" >
						<view style="flex: 1;border: 1px solid #bcbcbc; border-radius: 4px;margin-right: 10rpx;">
							<u-input v-model="serialNumber[index]" placeholder="请输入监控序列号"></u-input>
						</view>
						<view style="width: 150rpx;display: flex;justify-content: space-around;">
							<u-icon name="plus-circle" color="#13989a" size="28" @click="plusClick"></u-icon>
							<u-icon name="minus-circle" color="#f56c6c" size="28" @click="minusClick(index)"></u-icon>
						</view>
					</view>
				</view>
				<!-- <view class="flex alignItem bewteen" style="margin: 50rpx 0;">
					<view class="label" style="width: 200rpx;">监控序列号: </view>
					<view class="val" style="display: flex;" >
						<view style="flex: 1;border: 1px solid #bcbcbc; border-radius: 4px;margin-right: 10rpx;">
							<u-input v-model="serialNumberStr" placeholder="请输入监控序列号"></u-input>
						</view>
					</view>
				</view> -->
				<u-button type="primary"  text="绑定" @click="onSubmit2" ></u-button>
			</view>
		</u-popup>
		<u-popup :show="showUploadImage" @close="close" round="10" mode="bottom">
			<view class="overdueForm">
				<view class="overdueForm_title">
					<text>任务完成</text>
				</view>
				<text style="color: #cb2d01;padding-right: 5rpx;">*</text><text>上传图片:</text>
				<view style="width: 100%;height: 20rpx;"></view>
				<upload  v-if="showUploadImage"  name="overImage"  @uploadFile="uploadOverImge" ></upload>
				<!-- <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
					:maxCount="10"></u-upload> -->
				<view style="width: 100%;height: 50rpx;"></view>
				<view style="width:415rpx;margin:0 auto;margin-top: 25rpx;padding-bottom:25rpx" >
					<u-button shape="circle" color='linear-gradient(132deg, #02ABC7, #01C9A3)' @click="submit" v-if="loginType===6"> 保存</u-button>
				</view>
			</view>
		</u-popup>
		<u-popup :show="afterSaleShow" @close="close" round="10" mode="bottom">
			<view class="overdueForm">
				<view class="overdueForm_title">
					<text>申请售后</text>
				</view>
				<text style="color: #cb2d01;padding-right: 5rpx;">*</text><text>上传图片:</text>
				<view style="width: 100%;height: 20rpx;"></view>
				<upload  v-if="afterSaleShow"  name="afterSale"  @uploadFile="afterSaleImg" ></upload>
				<view style="border:1rpx solid #eee;box-sizing: border-box;margin:30rpx 0;">
				<u-textarea v-model='problemDescription' placeholder="问题描述"></u-textarea>
				</view>
				<u-button shape="circle" :color='color' @click="addAssignTaskAfter">提交</u-button>
			</view>
		</u-popup>
		<!-- 查看监控信息 -->
		<u-popup :show="aiMessageShow" @close="close" round="10" mode="bottom" @open="getAiMessage">
			<view class="list_contruct">
				<view class="list_contruct_title">
					<text>查看监控信息</text>
				</view>
				<view style="width: 100%;height: 50vh;margin-bottom: 50rpx;box-sizing: border-box;" v-if="aiMessageParams.aiMessageList.length===0">
					<u-empty
					        mode="data"
					        icon="https://renovationcdn.jiachuangnet.com/empty.jpg"
							width="100%"
							height="100%"
					>
					</u-empty>
				</view>
				 <u-list @scrolltolower="scrolltolower" v-else>
				      <u-list-item v-for="(item, index) in aiMessageParams.aiMessageList" :key="index" >
				       <view class="aiMessageItem" >
							<image :src="'http://'+item.resultUrl" mode="" style="height: 100%;width: 100%;" @click="aiMessageItemClick(index)"></image>
							<view class="aiMessage">
								{{item.createTime+'-'+item.taskName}}
							</view>
				       </view>
				      </u-list-item>
				</u-list>
			</view>
		</u-popup>
		<u-action-sheet @close='close' :actions="list" round="10" cancelText="取消" description='点击选项 可拨打电话.' title="联系我们"
			:show="mobileShow" @select='actionSheetClick'></u-action-sheet>
	</view>
</template>

<script>
	import rayVideo from '@/components/rayVideo/index.vue'
	import { numberToChanie } from '../../util.js'
	let app = getApp();
	export default {
		data() {
			return {
				serialNumberStr:'',
				afterSaleImgList:[],
				problemDescription:'',
				afterSaleShow:false,
				showUploadImage:false,
				currentSerialNumber:'',
				currentSerialNumberMsg:null,
				videoStatus:0,
				videoLoad:0,
				CADLoad:0,
				load1:0,
				textVideo:'实时监控未绑定',
				serialNumber:[],
				videoSrc:'',
				upload1:false,
				videoSrcBind:false,
				upload:false,
				checkboxValueList:[],
				imgList: [],
				token: '',
				fileList1: [],
				overdueReason: '',
				id: 0,
				status: null,
				userEvaluateFormShow :false,
				aiMessageShow:false,
				aiMessageParams:{
					aiMessageList:[],
					pageNumber:1,
					pageSize:10,
					total:1
				},
				mobileShow: false,
				color: app.globalData.defaultColor,
				scrollTop: 0,
			    userActive:null,
				loginType:null,
				old: {
					scrollTop: 0
				},
				// 提交的节流控制阀门
				timer:'',
				flag:0,
				currentOverTaskName:'',
				showOverdueForm: false,
				list: [
					{
						name: '监理',
						subname: "店铺质量事宜",
						color: '#13989a',
					},
					{
						name: '项目经理',
					},
					{
						name: '售后',
					},
					{
						name: '加盟商',
						 
					},
					 
				],
				active: 0,
				userFeedbackMobile:'',
				userFeedbackRemark:'',
				taskList: [],
				assignTaskDetails:[],
				picCAD:'',
				elevations:[],
				initElevations:[],
				overImge:[],
				overImgList:[],
				overImgListOnly:[],
				info: {
					isAfter:0,
					assignTaskId:0,
					assignName: '',
					address: '',
					userName: '',
					projectPhone: '',
					customerPhone:'',
					userPhone:'',
					chargePhone:'',
					afterPhone:'',
					afterName:'',
					taskUser: 'ADMIN.',
					createTime: '',
					customerScore:'',
					projectUserName:'',
					description:'',
					status:null,
					customerName:'',
					list: [
					],
					lat:0,
					lon:0,
					materialList: [],
					cadUrl:'',
					elevations:[],
					storeType:null,
					load:0,
					serialNumber:[],
				}
			}
		},
		onLoad(option) {
			this.info.assignTaskId = option.assignTaskId;
			this.loginType= uni.getStorageSync('loginType')
			this.load=1
		},
		filters:{
			numberToChanieFilter(num){
				return numberToChanie(num)
			}
		},
		components:{
			rayVideo
		},
		onShow() {
			this.getTaskDetailByAssignTaskId()
			this.getAssignTaskDetails()
			
		},
		methods: {
			isRepeatSerialNumber(){
				return new Promise((resolve)=>{
					const addSerialNumberArr= this.serialNumber.filter(v1=>!this.info.serialNumber.includes(v1))
					if(addSerialNumberArr.length){
						
						addSerialNumberArr.some( async(serialNumber,index)=>{
							const res= await uni.$u.http.get('/appraise/getAssignTaskInfo', {
								params:{
									serialNumber
								}
							})
							if(res.length>0){
								// 重复绑定
								uni.showModal({
									title: '提示:',
									content: `监控序列号${serialNumber}已在${res[0].assignName}绑定,是否解绑?`,
									success: (res1) => {
										if (res1.confirm) {
											uni.$u.http.post('/appraise/updateAssignTaskSerialNumber', {
												serialNumber,
												assignTaskId:res[0].assignTaskId
											}).then(res=>{
												if(res){
													uni.$u.toast('解绑成功 :)');
												}
											})
										} else if (res.cancel) {
											uni.$u.toast('用户取消:)');
									
										}
								
									}
								})
								resolve(true)
								return true
							}
							if((addSerialNumberArr.length-1==index)&&res.length<=0){
								console.log('没有重复项')
								// 循环最后一项,并且接口判断无重复项
								resolve(false)
							}
							
							// return true : 循环结束,找到了满足条件的元素
							  // return false : 循环继续,没找到循环继续,如果所有元素全部遍历还是没找到,最终结果为false
						})
					}else{
						resolve(false)
					}
				})
				
				
				
			},
			scrolltolower(){
				console.log('触底')
				if(this.aiMessageParams.aiMessageList.length<this.aiMessageParams.total){
					this.aiMessageParams.pageNumber++
					this.getAiMessage()
				}
			},
			getAiMessage(){
				uni.$u.http.get('/appraise/getAiMessage', {
					params:{
						assignTaskId:this.info.assignTaskId,
						pageNumber:this.aiMessageParams.pageNumber,
						pageSize:this.aiMessageParams.pageSize,
					}
				}).then(res=>{
					if(res){
						this.aiMessageParams.aiMessageList=[...this.aiMessageParams.aiMessageList,...res.data]
						this.aiMessageParams.total=res.total
					}
				})
			},
			close(){
				this.upload=false
				this.upload1=false
				this.videoSrcBind=false
				this.showUploadImage=false
				this.afterSaleShow=false
				this.userEvaluateFormShow = false;
				this.mobileShow = false;
				this.aiMessageShow=false;
				this.serialNumberStr=''
				this.aiMessageParams.aiMessageList=[]
				this.aiMessageParams.pageNumber=1
				this.aiMessageParams.total=1
			},
			afterSaleImg(msg){
				this.afterSaleImgList=msg.files
			},
			uploadOverImge(msg){
				this.overImge=msg.files
			},
			changeSerialNumberMsg(e){
				this.getVideoUrl()
			},
			addAssignTaskAfter(){
				if(this.afterSaleImgList.length&&this.problemDescription.length){
					uni.$u.http.post('/after/addAssignTaskAfter', {
						assignTaskId:this.info.assignTaskId,
						afterProblem:this.problemDescription,
						afterProblemImg:this.afterSaleImgList
					}).then(res=>{
						uni.$u.toast('添加成功');
						uni.navigateTo({
							url: '/pages/afterSales/index'
						})
					})
				}else{
					uni.$u.toast('请信息填写完整:)');
				}
				
				
			},
			minusClick(index){
				if(this.serialNumber.length===1){
					return uni.$u.toast('至少添加一条序列号:)');
				}
				this.serialNumber.splice(index,1)
			},
			plusClick(){
				this.$set(this.serialNumber,this.serialNumber.length,'')
			},
			// 判断数组是否有重复的
			isRepeat(arr){
				return Array.from(new Set(arr)).length < arr.length
			},
			 async onSubmit2(){
				if(this.videoLoad==1){
					return uni.showLoading({
						title: '请勿重复提交 :)'
					});
				}
		
				if(!this.serialNumber.length){
					return uni.$u.toast('请输入监控序列号:)');
				}
				
				if(this.isRepeat(this.serialNumber)){
					return uni.$u.toast('序列号不能重复 :)');
				}
				// 检测监控序列号不能同是被绑定
				// 新增的监控序列号需要校验
				let isRepeat
				isRepeat =  await this.isRepeatSerialNumber()
				
				// const res= await uni.$u.http.get('/appraise/getAssignTaskInfo', {
				// 	params:{
				// 		serialNumber:this.serialNumberStr
				// 	}
				// })
				// if(res.length>0){
				// 	console.log('重复绑定')
				// 	// 重复绑定
				// 	uni.showModal({
				// 		title: '提示:',
				// 		content: `监控序列号${this.serialNumberStr}已在${res[0].assignName}绑定,是否解绑?`,
				// 		success: (res1) => {
				// 			if (res1.confirm) {
				// 				uni.$u.http.post('/appraise/updateAssignTaskSerialNumber', {
				// 					serialNumber:this.serialNumberStr,
				// 					assignTaskId:res[0].assignTaskId
				// 				}).then(res=>{
				// 					if(res){
				// 						uni.$u.toast('解绑成功 :)');
				// 					}
				// 				})
				// 			} else if (res.cancel) {
				// 				uni.$u.toast('用户取消:)');
						
				// 			}
					
				// 		}
				// 	})
				// 	return
				// }
				
				if(!isRepeat){
					this.videoLoad=1
					uni.$u.http.post('/assign/updateAssignTaskAiSerialNumber', {
						assignTaskId:this.info.assignTaskId,
						serialNumber:this.serialNumber
					}).then(res=>{
						if(res){
							uni.$u.toast('绑定成功!');
							this.getTaskDetailByAssignTaskId()
							this.videoSrcBind=false
							// this.serialNumberStr=''
						}
						this.videoLoad=0
					})
				}
				
				
			},
			getVideoUrl(){
				uni.$u.http.get('/firmCamera/getLiveAddress', {
					params:{
						serialNumber:this.currentSerialNumber,
					}
				}).then((res)=>{
					if(res){
						this.videoStatus=1
						this.videoSrc=res
					}else{
						this.videoStatus=-1
						this.textVideo='摄像头不在线!'
					}
				})
			},
			uploadFile(msg){
				this.elevations=msg.files
			},
			onSubmit1(){
				if(this.load1==1){
					return uni.showLoading({
						title: '请勿重复提交 :)'
					});
				}
				this.load1=1
				// 节流处理
				uni.$u.http.post('/assign/uploadElevations', {
						assignTaskId:this.info.assignTaskId,
						elevations:this.elevations,
					}).then(res=>{
						if(res){
							uni.$u.toast('立面图上传成功!');
							this.upload1=false
							this.getTaskDetailByAssignTaskId()
						}
						this.load1=0
					})
			},
			onSubmit(){
				// 节流处理
				if(this.CADLoad==1){
					return uni.showLoading({
						title: '请勿重复提交 :)'
					});
				}
				
				if(this.picCAD[0]){
					this.CADLoad=1
					this.cadParse()
				}else{
					uni.$u.toast('CAD上传不能为空!');
				}
			},
			uploadCad(){
				uni.$u.http.get('/assign/uploadCad', {
						params:{
							assignTaskId:this.info.assignTaskId,
							cadUrl:this.picCAD[0],
						}
					}).then(res=>{
						if(res){
							uni.$u.toast('CAD上传成功!');
							this.upload=false
							this.CADLoad=0
							this.getTaskDetailByAssignTaskId()
							this.getClassificationDtoList()
						}else{
							
							uni.$u.toast('CAD上传失败!');
							this.CADLoad=0
						}
					})
			},
			cadParse(){
				uni.$u.http.post('/new/cad/parse', {
						assignTaskId:this.info.assignTaskId,
						cadImg:this.picCAD[0],
						storeType:this.info.storeType
					}).then(res=>{
						console.log(res,'CAD解析')
						if(res.code&&res.code.length==0){
							uni.$u.toast('CAD解析成功!');
							this.uploadCad()
						}else{
							
							uni.showModal({
							          title: 'CAD解析失败',
							          content: res.code.join(','),
							        })
							this.CADLoad=0
						}
					})
			},
			uploadCADFile(msg){
				this.picCAD=msg.files
			},
			getTaskDetailByAssignTaskId(){
				uni.$u.http.get('/task/getTaskDetailByAssignTaskId', {
					params:{
						assignTaskId:this.info.assignTaskId,
					}
				}).then(res=>{
					console.log(res,'获取任务详情信息')
					if(res){
						this.info.assignName=res.assignName
						 this.info.projectPhone=res.projectPhone
						 this.info.createTime=res.createTime.split(' ')[0]
						 this.info.address=res.address
						 this.info.customerScore=res.customerScore
						 this.info.chargeScore=res.chargeScore
						 this.info.projectUserName=res.projectUserName
						 this.info.userName=res.userName
						 this.info.customerPhone=res.customerPhone
						 this.info.userPhone=res.userPhone
						 this.info.afterName=res.afterName
						this.info.chargePhone=res.chargePhone
						this.info.afterPhone=res.afterPhone
						this.info.status=res.status
						this.info.storeType=res.storeType
						this.info.day=res.day
						this.info.lat=res.lat
						this.info.lon=res.lon
						this.info.serialNumber=res.serialNumber||[]
						this.info.customerName=res.customerName
						this.info.isAfter=res.isAfter
						this.initElevations=res.elevations
						if(res.cadUrl){
							this.info.cadUrl='http://'+res.cadUrl
						}
						if(res.elevations&&res.elevations.length!==0){
							this.info.elevations=res.elevations.map(url=>{
								if(url){
									return 'http://'+url
								}
							})
						}
						if(this.info.serialNumber&&this.info.serialNumber.length!=0){
							this.serialNumber= [...this.info.serialNumber]
							this.currentSerialNumber=this.serialNumber[0]
							this.currentSerialNumberMsg=this.info.serialNumber.map((item,index)=>{
								return {
									value:item,
									text:'摄像头'+(index+1)
								}
							})
							this.getVideoUrl()
						}else{
							this.serialNumber[0]=''
						}
						
						// 首次加载
						if(this.load==1){
							if(!this.info.serialNumber.length&&(this.loginType===0||this.loginType===3||this.loginType===1)){
								this.videoSrcBind=true
							}
							this.load=0
						}
						// 获取用户权限
						this.userEvaluateFormShow =uni.getStorageSync('loginType')==4&&this.info.status===3&&this.info.chargeScore&&!this.info.customerScore;
					}
				})
			},
			getClassificationDtoList(){
				uni.$u.http.get('/materials/getClassificationDtoList', {
					params:{
						assignTaskId:this.info.assignTaskId,
					}
				}).then(res=>{
					console.log(res,'获取材料明细')
					if(res){
						this.info.materialList=res
					}
				})
			},	
			submit(){
				if(this.info.status==3){
					return uni.$u.toast('已完成的任务不允许修改');
				}
				if(this.flag==1){
					return uni.showLoading({
						title: '请勿重复提交 :)'
					});
				}
				if(this.timer){
					return uni.$u.toast('提交太频繁了!');
				}
				this.timer=setTimeout(()=>{
					this.timer=null
				},3000)
				this.assignTaskDetails.forEach((item,index)=>{
					this.assignTaskDetails[index].assignTaskList.task.forEach((item2,index2)=>{
						item2.ok=this.checkboxValueList[index].includes(item2.taskName)?1:0
					})
				})
				if(this.loginType===6){
					const taskIndex=this.assignTaskDetails[this.active].assignTaskList.task.findIndex(item=>item.taskName==this.currentOverTaskName)
					let temp= this.assignTaskDetails[this.active].assignTaskList.task[taskIndex].images
					this.assignTaskDetails[this.active].assignTaskList.task[taskIndex].images=[...temp ,...this.overImge]
				}
				
				this.flag=1
				this.updateAssignTaskDetails()
			},
			updateAssignTaskDetails(){
				uni.$u.http.post('/assign/updateAssignTaskDetails', {
					assignTaskId:this.info.assignTaskId,
					assignTaskList:this.assignTaskDetails
				}).then(res=>{
					console.log('1212121',res)
					if(res){
						uni.showToast({
							title: '保存成功!',
							duration: 2000
						})
						this.closeUploadOverImage()
						this.getAssignTaskDetails()
					}
					
					this.flag=0
				})
			},
			getAssignTaskDetails(){
				uni.$u.http.get('/assign/getAssignTaskDetails', {
					params:{
						assignTaskId:this.info.assignTaskId
					}
				}).then(res=>{
					console.log(res,'获取任务详情')
					if(res){
						this.assignTaskDetails=res
						this.taskList= res.map((item,index)=>{
							let obj={
								'today':item.assignTaskList.today,
							}
							this.$set(this.checkboxValueList,index,[])
							let list= item.assignTaskList.task.map((item2,index2)=>{
								if(item2.ok){
									this.checkboxValueList[index][index2]=item2.taskName
									this.checkboxValueList[index][index2]=item2.taskName
								}
								return {
									'name':item2.taskName,
									status:item2.ok?true:false,
									disabled:item2.ok?true:false
								}
							})
							return {...obj,list}
						})
						this.overImgListOnly=[]
						res.map((item,index)=>{
							let obj={}
							let dayName=item.assignTaskList.name
							let taskName=''
							item.assignTaskList.task.map(item2=>{
								taskName=item2.taskName
								item2.images.map((url,index)=>{
									this.overImgList.push({
										image:'https://'+url,
										title:dayName+taskName+`(${index+1})`
									})
									this.overImgListOnly.push('https://'+url)
								})
								
							})
						})
					}
				})
			},
			addAppraise(){
				const params={
					taskId:this.info.assignTaskId,
					content:this.userFeedbackRemark,
					score:this.userActive+1
				}
				uni.$u.http.post('/appraise/addAppraise', params).then(res=>{
					console.log(res,'评价')
					if(res){
						uni.showToast({
							title: '用户评论成功!',
							duration: 2000
						})
						this.userEvaluateFormShow=false
					}
				})
			},
			
			userClick(i){
				this.userActive = i;
			},
			taskChange(e) {
				console.log(e)
				this.showUploadImage=true
				this.currentOverTaskName=e
			},
			closeUploadOverImage(){
				this.showUploadImage=false
				this.overImge=[]
				this.currentOverTaskName=''
				this.getAssignTaskDetails()
			},
			closeAfterSaleShow(){
				this.afterSaleShow=false
				this.afterSaleImgList=[]
				this.problemDescription=''
			},
			toPath(url) {
				uni.navigateTo({
					url: `/pages/${url}/index?assignTaskId=${this.info.assignTaskId}&storeType=${this.info.storeType}&address=${this.info.address}&assignName=${this.info.assignName}`
				})
			},
			toPathB(url) {
				uni.navigateTo({
					url: `/packageB/pages/${url}/index?assignTaskId=${this.info.assignTaskId}&storeType=${this.info.storeType}&address=${this.info.address}&assignName=${this.info.assignName}`
				})
			},
			call() {
				console.log('call')
				uni.makePhoneCall({
					phoneNumber: this.info.projectPhone,
					success: (res) => {
						console.log(res)
					}
				})
			},
			setClip() {
				uni.setClipboardData({
					data: this.info.assignName,
					success: function() {
						console.log('success');
					}
				});
			},
			CADClick(){
				uni.previewImage({
					current: 0,
					urls: [this.info.cadUrl],
					longPressActions: {
							itemList: ['保存图片'],
							success: data=> {
								console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
								uni.closePreviewImage()
								/* 保存图片到系统相册 */
								if(data.tapIndex==0){
									uni.getImageInfo({
												src:this.info.cadUrl,
												success: function(res) {
													console.log(res)
													uni.saveImageToPhotosAlbum({ //保存图片到系统相册。
														filePath:res.path, //图片文件路径
														success: function() {
															uni.showToast({
																title: '图片保存成功',
																icon: 'none',
															});
														},
														fail: function(e) {
															console.log(e);
															uni.showToast({
																title: '图片保存失败',
																icon: 'none',
															});
														},
													});
												},
												fail: function(e) {
													console.log(e);
													uni.closePreviewImage()
													uni.showToast({
														title: '图片保存失败',
														icon: 'none',
													});
												},
											})
								}
							},
							fail: function(err) {
								console.log(err.errMsg);
							}
												}
				});
			},
			aiMessageItemClick(i){
				console.log(i)
				const imagesList=this.aiMessageParams.aiMessageList.map(item=>'http://'+item.resultUrl)
				uni.previewImage({
					current: i,
					urls: imagesList,
					longPressActions: {
						itemList: ['保存图片'],
						success: data=> {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
							uni.closePreviewImage()
							/* 保存图片到系统相册 */
							if(data.tapIndex==0){
								uni.getImageInfo({
											src:imagesList[data.index],
											success: function(res) {
												console.log(res)
												uni.saveImageToPhotosAlbum({ //保存图片到系统相册。
													filePath:res.path, //图片文件路径
													success: function() {
														uni.showToast({
															title: '图片保存成功',
															icon: 'none',
														});
													},
													fail: function(e) {
														console.log(e);
														uni.showToast({
															title: '图片保存失败',
															icon: 'none',
														});
													},
												});
											},
											fail: function(e) {
												console.log(e);
												uni.closePreviewImage()
												uni.showToast({
													title: '图片保存失败',
													icon: 'none',
												});
											},
										})
							}
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					},
					fail: function(err) {
						console.log(err.errMsg);
					}
				});
			},
			swiperClick(i) {
				uni.previewImage({
					current: i,
					urls: this.info.elevations,
					longPressActions: {
						itemList: ['保存图片'],
						success: data=> {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
							uni.closePreviewImage()
							/* 保存图片到系统相册 */
							if(data.tapIndex==0){
								uni.getImageInfo({
											src:this.info.elevations[data.index],
											success: function(res) {
												console.log(res)
												uni.saveImageToPhotosAlbum({ //保存图片到系统相册。
													filePath:res.path, //图片文件路径
													success: function() {
														uni.showToast({
															title: '图片保存成功',
															icon: 'none',
														});
													},
													fail: function(e) {
														console.log(e);
														uni.showToast({
															title: '图片保存失败',
															icon: 'none',
														});
													},
												});
											},
											fail: function(e) {
												console.log(e);
												uni.closePreviewImage()
												uni.showToast({
													title: '图片保存失败',
													icon: 'none',
												});
											},
										})
							}
						},
													fail: function(err) {
														console.log(err.errMsg);
													}
												}
				});
			},
			swiperClick2(i) {
				uni.previewImage({
					current: i,
					urls: this.overImgListOnly,
					longPressActions: {
						itemList: ['保存图片'],
						success: data=> {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
							uni.closePreviewImage()
							/* 保存图片到系统相册 */
							if(data.tapIndex==0){
								uni.getImageInfo({
											src:this.overImgListOnly[data.index],
											success: function(res) {
												console.log(res)
												uni.saveImageToPhotosAlbum({ //保存图片到系统相册。
													filePath:res.path, //图片文件路径
													success: function() {
														uni.showToast({
															title: '图片保存成功',
															icon: 'none',
														});
													},
													fail: function(e) {
														console.log(e);
														uni.showToast({
															title: '图片保存失败',
															icon: 'none',
														});
													},
												});
											},
											fail: function(e) {
												console.log(e);
												uni.closePreviewImage()
												uni.showToast({
													title: '图片保存失败',
													icon: 'none',
												});
											},
										})
							}
						},
													fail: function(err) {
														console.log(err.errMsg);
													}
												}
				});
			},
			actionSheetClick(e){
				let phoneNumber=0
				switch(e.name) {
				     case '监理':
				        phoneNumber=this.info.chargePhone
				        break;
				     case '项目经理':
				        phoneNumber=this.info.projectPhone
				        break;
					case '售后':
					   phoneNumber=this.info.afterPhone
					   break;
					case '加盟商':	
					   phoneNumber=this.info.userPhone
					   break;
				     default: 
				} 
				uni.makePhoneCall({
					phoneNumber,
					success: (res) => {
						console.log(res)
					}
				})
			},
			open() {
				uni.openLocation({
					latitude:Number(this.info.lat), // 纬度
					longitude:Number(this.info.lon), // 经度
					name: this.info.address, // 位置名
					scale: 16 // 缩放比例
				});
			},
			scroll: function(e) {
				this.old.scrollTop = e.detail.scrollTop
			},
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep.container{
		.uni-select__input-text{
			color: #fff;
			text-decoration: underline;
		}
		.uni-icons{
			display: none;
		}
		.uni-select__selector{
			color: #333333;
		}
		.uni-select {
			font-size: 26rpx;
			border: unset;
		}
		.uniui-clear{
			display: none;	
		}
	}
	.upload_title {
		font-weight: 700;
		display: flex;
		justify-content: center;
	}
	
	.uploadForm {
		max-height: 60vh;
		overflow-y: auto;
		padding: 50rpx 15rpx;
	}
	.day{
		text-align: center;
		font-weight: 700;
		font-size: 30rpx;
		color: #fff;
		transform: rotate(-20deg);
		vertical-align: middle;
		  word-break:keep-all;
		  white-space:nowrap; 
	}
	.overdueForm_title,.list_contruct_title {
		font-weight: 700;
		display: flex;
		justify-content: center;
	}
	.list_contruct_title{
		padding: 20rpx 0;
	}
	.aiMessageItem{
		position: relative;
		height: 25vh;
		margin: 25rpx;
		box-sizing: border-box;
	}
	.aiMessage{
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 25rpx 0;
		font-size: 28rpx;
		padding: 12rpx 24rpx;
		color: #FFFFFF;
		background-color: rgba(0, 0, 0, 0.3);
	}
	.overdueForm {
		padding: 50rpx 15rpx;
	}
	::v-deep.list_contruct{
		
		.u-list{
			height: 50vh !important;
		}
	}
	.bg {
		width: 750rpx;
		height: 453rpx;
		background: linear-gradient(28deg, #13989A, #ECF4F6);
		opacity: 0.3;
		// position: absolute;
		// top: 0;
		// left: 0;
		// z-index: 1;
	}

	.container {
		width: 700rpx;
		margin: 0 auto;
		position: absolute;
		top: 200rpx;
		left: 25rpx;
		min-height: 200rpx;
		z-index: 1;
	}

	.infoContent {
		width: calc(100% - 40rpx);
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		grid-gap: 20rpx;
		background: #fff;
		padding: 20rpx;
		// margin-top: 58rpx;
		border-radius: 16rpx;
		background-color: white;
		font-size: 28rpx;
		text-align: left;
		// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
	}

	.infoContent>view {
		display: flex;


	}

	.label {
		width: 100rpx;
		font-size: 28rpx;
	}

	.val {
		text-align: left !important;
		font-size: 28rpx;
	}

	.CADImage,.swiperImage {
		width: 100%;
		height: 520rpx;
		position: relative;
		margin: 0 auto;
		margin-top: 40rpx;
		// background-repeat: no-repeat;
		// background-size: cover;
		// background: url('http://skv5jh74d.hn-bkt.clouddn.com/details/CADBg.png?e=1728194859&token=Uw65xcftwz9gmAL88CkCQDOLnHuqiD5jAvGQ7msg:6-q9E_4TW4y3MNZiYJ1nmx2Dc2c=');
	}
	
	.line {
		width: 8rpx;
		height: 26rpx;
		border-radius: 4rpx;
		margin-right: 10rpx;
		background-color: #13989A;
	}

	.materialBox {
		width: 700rpx;
		padding-top: 16rpx;
		height: 454rpx;
		background: linear-gradient(-24deg, #01CF9C, #029ED7);
		border-radius: 10rpx;
	}

	.materialInner {
		width: 668rpx;
		height: 430rpx;
		background: rgba(255, 255, 255, 0.4);
		border-radius: 10rpx;
		margin: 0 16rpx;
	}

	.materialTitle {
		height: 70rpx;
		margin: 0 20rpx;
		line-height: 70rpx;
		color: white;
	}

	.materialItem {
		margin: 36rpx 20rpx 0 20rpx;
		padding-bottom: 36rpx;
		border-bottom: 1rpx dashed #B4B4B4;
	}

	.materialItem:nth-last-child(1) {
		border: none !important;
	}

	.taskTabs {
		width: 100%;
		white-space: nowrap;
		height: 100rpx;

	}

	.main {
		min-height: 100vh;
	}

	.main /deep/ .u-swiper__indicator {
		bottom: -45rpx !important;
		z-index: 10000;
	}

	.scroll-view_H {
		white-space: nowrap;
		width: 100%;
	}

	.scroll-view-item_H {
		display: inline-block;
		width: 126rpx;
		height: 70rpx;
		line-height: 70rpx;
		text-align: center;
		font-size: 30rpx;
		margin-right: 30rpx;
	}

	.scroll-view-item_H:nth-last-child(1) {
		margin-right: 0 !important;
	}

	.active {
		background: url('https://renovationcdn.jiachuangnet.com/details/active.png');
		background-repeat: no-repeat;
		background-size: cover;
		border-radius: 10rpx;
		color: #13989A;
	}

	.taskInner {
		margin-top: 20rpx;
		box-sizing: border-box;
		width: 700rpx;
		height: 330rpx;
		background: white;
		border: 10rpx solid #DEECEC;
		border-radius: 20rpx;
	}
	.userActive{
		background-color: #13989A !important;
		color:white !important;
		border-color: #13989A !important;
	}
</style>